home *** CD-ROM | disk | FTP | other *** search
/ Drivin' Route 66 / Drivin' Route 66 (1995)(Creative Multimedia)[Mac-PC].iso / mac / RTMM.DIR / 00011_Script_MAIN.other < prev    next >
Text File  |  1995-10-03  |  16KB  |  534 lines

  1. --⌐ 1995, Cambridge Digital Media, Inc.
  2.  
  3. on pickState
  4.   put the frame into f
  5.   if f = 5 OR f = 7  OR (f > 11 AND f < 33) then
  6.     -- USA MAP:
  7.     repeat with  s = 3 to 11
  8.       if rollOver(s) then
  9.         -- put line s-2 of field "state index" -- debug
  10.         put 1 into OnAState
  11.         exit repeat -- ???
  12.       else
  13.         put 0 into OnAState
  14.       end if
  15.     end repeat
  16.     if rollover(12) then
  17.       put 1 into OnAState
  18.       put 6 into s
  19.     end if
  20.     if OnAState then
  21.       put s-2 into BaseStateNum
  22.       go frame 11+(BaseStateNum*2)
  23.       if the mouseDown then -- GO TO A STATE:
  24.         -- SetupSigns
  25.         put s-2 into BaseStateNum
  26.         -- alert string(33+(BaseStateNum*2))
  27.         -- alert string((BaseStateNum))
  28.         if BaseStateNum = 9 then put 10 into BaseStateNum
  29.         updateStage
  30.         doDelay
  31.         prepMaps
  32.         repeat with s = 33 to 39
  33.           set the visible of sprite s to false
  34.         end repeat
  35.         go frame 33+(BaseStateNum*2)
  36.       end if
  37.     else
  38.       go frame 7
  39.       repeat with  s = 35 to 37
  40.         puppetSprite s,0
  41.         if rollOver(s) then
  42.           puppetSprite s,1
  43.           set the castNum of sprite s to (the castNum of sprite s) + 1
  44.           updateStage
  45.           repeat while rollOver(s)
  46.             if the mouseDown then
  47.               set the castNum of sprite s to (the castNum of sprite s) + 1
  48.               updateStage
  49.               
  50.               repeat while the mouseDown
  51.                 nothing
  52.               end repeat
  53.               doDelay
  54.               set the castNum of sprite s to (the castNum of sprite s) - 1
  55.               updateStage
  56.               doPicon s-34
  57.               updatestage
  58.             end if
  59.           end repeat
  60.           set the castNum of sprite s to (the castNum of sprite s) - 1
  61.           updateStage
  62.           
  63.           puppetSprite s,0
  64.           put 1 into OnAPicon
  65.         else
  66.           put 0 into OnAPicon
  67.         end if
  68.       end repeat
  69.     end if 
  70.   end if
  71.   go the frame
  72. end
  73.  
  74. on pickSite -- Nice localized handler for state level
  75.   global currentStateMap,gtheState,gtheSite
  76.   if the visible of sprite 33 then -- TRIP PLANNER IS ON!!
  77.     nothing
  78.   else
  79.     hideTrip
  80.     put the frame into f
  81.     if f > 34 AND f < 55 then
  82.       repeat with  s = 18 to 31 -- max number of signs
  83.         if rollOver(s) then
  84.           if the castnum of sprite s > 0 then
  85.             put 1 into OnASite
  86.             exit repeat -- ???
  87.           end if
  88.         else
  89.           put 0 into OnASite
  90.         end if
  91.       end repeat
  92.       if OnASite then
  93.         puppetSprite 17,1
  94.         -- Some rollOver() code for shield art:
  95.         put s - 18 into offsetSite -- ò18 = sprite 1 of shields...
  96.         
  97.         put (findState() + offsetSite)*2 into goThisSite
  98.         
  99.         put "U" & getPadded(goThisSite / 2) & "sm.PICT" into ShieldCastArt
  100.         -- put ShieldCastArt
  101.         set the castNum of sprite 17 to the number of cast ShieldCastArt
  102.         
  103.         if the visible of sprite 17 = false then
  104.           set the visible of sprite 17 to true
  105.         end if
  106.         
  107.         updateStage
  108.         
  109.         put the frame-1 into currentStateMap
  110.         
  111.         
  112.         if the mouseDown then
  113.           
  114.           set the castNum of sprite s to¼
  115.  (the number of cast "RTE 66 SITE BUTTON.h")
  116.           updatestage
  117.           
  118.           -- RTE 66 SITE BUTTON.h
  119.           repeat while the mouseDown
  120.             nothing
  121.           end repeat
  122.           doDelay
  123.           set the castNum of sprite s to¼
  124.  (the number of cast "RTE 66 SITE BUTTON")
  125.           
  126.           repeat with x = 1 to 46
  127.             puppetSprite x,0
  128.           end repeat
  129.           updatestage
  130.           
  131.           prepSites
  132.           put findStateNumber() into gtheState
  133.           put -1 into gtheSite -- Always at top
  134.           put goThisSite + (61) -2 into foo
  135.           if foo > 179 then
  136.             go frame foo-2
  137.           else
  138.             go frame foo
  139.           end if
  140.           puppetPalette 0
  141.           
  142.           -- yyy
  143.           PrimeNarrate
  144.         end if
  145.       else
  146.         if the visible of sprite 17 = true then
  147.           set the visible of sprite 17 to false
  148.           doDelay
  149.         end if
  150.       end if
  151.       -- TEST SIGNS ON STATE LEVEL:
  152.       repeat with  s = 40 to 45
  153.         if rollOver(s) then
  154.           put 1 into OnASign
  155.           exit repeat -- ???
  156.         else
  157.           put 0 into OnASign
  158.         end if
  159.       end repeat
  160.       if OnASign then
  161.         if the mouseDown then
  162.           repeat with x = 40 to 45
  163.             puppetSprite x,1
  164.           end repeat
  165.           puppetTransition 0
  166.           updateStage
  167.           if s <> 44 then
  168.             set the castNum of sprite s to the castNum of sprite s+8
  169.             updateStage
  170.             repeat while the mouseDown
  171.               nothing
  172.             end repeat
  173.             doDelay
  174.             set the castNum of sprite s to the castNum of sprite s-8
  175.             updateStage
  176.           end if
  177.           if s = 40 then -- U-TURN
  178.             repeat with x = 1 to 46
  179.               puppetSprite x,0
  180.             end repeat
  181.             puppetTransition 0
  182.             updateStage
  183.             go "US MAP"
  184.           else if s = 41 then -- HELP
  185.             helpScreen 1
  186.           else if s = 42 then -- 66
  187.             -- Skip 66 Shield...
  188.           else if s = 43 then -- EXIT
  189.             repeat with x = 1 to 46
  190.               puppetSprite x,0
  191.             end repeat
  192.             puppetTransition 0
  193.             updateStage
  194.             quit
  195.           else if s = 44 then -- L/R
  196.             put the locH of sprite s into midPt
  197.             if the mouseH < midPt then -- go back
  198.               set the castNum of sprite s to the castNum of sprite s-1
  199.               updateStage
  200.               repeat while the mouseDown
  201.                 nothing
  202.               end repeat
  203.               doDelay
  204.               set the castNum of sprite s to the castNum of sprite s+1
  205.               puppetSprite s,0
  206.               updateStage
  207.               repeat with x = 1 to 46
  208.                 puppetSprite x,0
  209.               end repeat
  210.               puppetTransition 0
  211.               updateStage
  212.               if (the frame) - 1 = label("CA") then
  213.                 -- CAN'T GO BACK MORE
  214.               else if (the frame) - 1 = label("TEX 2") then
  215.                 go "NM"
  216.               else
  217.                 go (the frame) - 3
  218.               end if
  219.             else -- go forth
  220.               set the castNum of sprite s to the castNum of sprite s+1
  221.               updateStage
  222.               repeat while the mouseDown
  223.                 nothing
  224.               end repeat
  225.               doDelay
  226.               puppetSprite s,0
  227.               set the castNum of sprite s to the castNum of sprite s-1
  228.               updateStage
  229.               repeat with x = 1 to 46
  230.                 puppetSprite x,0
  231.               end repeat
  232.               puppetTransition 0
  233.               updateStage
  234.               if (the frame) - 1 = label("ILL 1") then
  235.                 -- CAN'T GO FURTHER
  236.               else if (the frame) - 1 = label("TEX 1") then
  237.                 go "OK"
  238.               else
  239.                 --  if the frame > 49 then
  240.                 --   go "state 1"
  241.                 --  else
  242.                 go (the frame) + 1
  243.                 --  end if
  244.               end if
  245.             end if
  246.           else if s = 45 then -- TRIPPY!
  247.             repeat with x = 1 to 46
  248.               puppetSprite x,0
  249.             end repeat
  250.             puppetTransition 0
  251.             updateStage
  252.             showTrip
  253.           end if
  254.         end if
  255.       end if
  256.     end if
  257.   end if
  258.   -- Should this go here?
  259.   go the frame
  260. end
  261.  
  262. on clickSite -- Nice localized handler for state level
  263.   global currentStateMap,gtheState,gtheSite
  264.   if the visible of sprite 33 then -- TRIP PLANNER IS ON!!
  265.     nothing
  266.   else
  267.     put 1 into OnASite
  268.     if OnASite then
  269.       puppetSprite 17,1
  270.       -- Some rollOver() code for shield art:
  271.       repeat with  s = 18 to 31 -- max number of signs
  272.         if rollOver(s) then
  273.           if the castnum of sprite s > 0 then
  274.             put 1 into OnASite
  275.             exit repeat -- ???
  276.           end if
  277.         else
  278.           put 0 into OnASite
  279.         end if
  280.       end repeat
  281.       put s - 18 into offsetSite -- ò18 = sprite 1 of shields...
  282.       
  283.       put (findState() + offsetSite)*2 into goThisSite
  284.       
  285.       put "U" & getPadded(goThisSite / 2) & "sm.PICT" into ShieldCastArt
  286.       -- put ShieldCastArt
  287.       set the castNum of sprite 17 to the number of cast ShieldCastArt
  288.       
  289.       if the visible of sprite 17 = false then
  290.         set the visible of sprite 17 to true
  291.       end if
  292.       
  293.       updateStage
  294.       
  295.       put the frame-1 into currentStateMap
  296.       
  297.       
  298.       
  299.       
  300.       set the castNum of sprite s to¼
  301.  (the number of cast "RTE 66 SITE BUTTON.h")
  302.       updatestage
  303.       
  304.       -- RTE 66 SITE BUTTON.h
  305.       repeat while the mouseDown
  306.         nothing
  307.       end repeat
  308.       doDelay
  309.       put 1 into OnASite
  310.       set the castNum of sprite s to¼
  311.  (the number of cast "RTE 66 SITE BUTTON")
  312.       
  313.       repeat with x = 1 to 46
  314.         puppetSprite x,0
  315.       end repeat
  316.       updatestage
  317.       prepSites
  318.       put findStateNumber() into gtheState
  319.       put -1 into gtheSite -- Always at top
  320.       put goThisSite + (61) -2 into foo
  321.       if foo > 179 then
  322.         go frame foo-2
  323.       else
  324.         go frame foo
  325.       end if
  326.       puppetPalette 0
  327.       
  328.       PrimeNarrate
  329.       
  330.     else
  331.     end if
  332.   end if
  333. end
  334.  
  335.  
  336.  
  337. on playSite
  338.   global currentStateMap,gTheState, where
  339.   go the frame
  340.   if the visible of sprite 33 then -- TRIP PLANNER IS ON!!
  341.     nothing -- nothing, baby
  342.   else
  343.     hideTrip
  344.     -- TEST SIGNS ON SITE LEVEL:
  345.     repeat with  s = 40 to 45
  346.       if rollOver(s) AND (the visible of sprite s) then
  347.         put 1 into OnASign
  348.         exit repeat -- ???
  349.       else
  350.         put 0 into OnASign
  351.       end if
  352.     end repeat
  353.     if OnASign then
  354.       if the mouseDown then
  355.         repeat with x = 40 to 45
  356.           puppetSprite x,1
  357.         end repeat
  358.         puppetTransition 0
  359.         updateStage
  360.         if s <> 44 then
  361.           set the castNum of sprite s to the castNum of sprite s+8
  362.           updateStage
  363.           repeat while the mouseDown
  364.             nothing
  365.           end repeat
  366.           doDelay
  367.           set the castNum of sprite s to the castNum of sprite s-8
  368.           updateStage
  369.         end if
  370.         if s = 40 then -- U-TURN
  371.           -- GO BACK TO THE RIGHT STATE!
  372.           repeat with x = 1 to 46
  373.             puppetSprite x,0
  374.           end repeat
  375.           puppetTransition 0
  376.           updateStage
  377.           prepMaps
  378.           go frame currentStateMap
  379.         else if s = 41 then -- HELP
  380.           helpScreen 1
  381.         else if s = 42 then -- 66
  382.           repeat with x = 1 to 46
  383.             puppetSprite x,0
  384.           end repeat
  385.           puppetTransition 0
  386.           updateStage
  387.           go "US MAP"
  388.         else if s = 43 then -- EXIT
  389.           repeat with x = 1 to 46
  390.             puppetSprite x,0
  391.           end repeat
  392.           puppetTransition 0
  393.           updateStage
  394.           quit
  395.         else if s = 44 then -- L/R
  396.           put the locH of sprite s into midPt
  397.           if the mouseH < midPt then -- go back
  398.             set the castNum of sprite s to the castNum of sprite s-1
  399.             updateStage
  400.             
  401.             repeat while the mouseDown
  402.               nothing
  403.             end repeat
  404.             doDelay
  405.             set the castNum of sprite s to the castNum of sprite s+1
  406.             puppetSprite s,0
  407.             updateStage
  408.             repeat with x = 1 to 46
  409.               puppetSprite x,0
  410.             end repeat
  411.             puppetTransition 0
  412.             updateStage
  413.             
  414.             -- DIRECTION SWITCHED 3/25/95 BT
  415.             
  416.             -- No Special Case! Yay!
  417.             
  418.             if (the frame) - 1 = label("site 65") then
  419.               go frame "site 1"
  420.             else
  421.               go frame (the frame) +1
  422.             end if
  423.             
  424.             put GetCurrentState() into gTheState
  425.             PrimeNarrate
  426.           else -- go forth
  427.             set the castNum of sprite s to the castNum of sprite s+1
  428.             updateStage
  429.             
  430.             repeat while the mouseDown
  431.               nothing
  432.             end repeat
  433.             doDelay
  434.             puppetSprite s,0
  435.             
  436.             set the castNum of sprite s to the castNum of sprite s-1
  437.             updateStage
  438.             repeat with x = 1 to 46
  439.               puppetSprite x,0
  440.             end repeat
  441.             puppetTransition 0
  442.             updateStage
  443.             
  444.             if (the frame) - 1 = label("site 1") then
  445.               go frame "site 65"
  446.             else
  447.               go frame (the frame) -3
  448.             end if
  449.             
  450.             
  451.             put GetCurrentState() into gTheState
  452.             PrimeNarrate
  453.           end if
  454.         else if s = 45 then -- TRIPPY!
  455.           repeat with x = 1 to 46
  456.             puppetSprite x,0
  457.           end repeat
  458.           puppetTransition 0
  459.           updateStage
  460.           showTrip
  461.         end if
  462.       end if
  463.     else
  464.       if the mouseDown then -- MAKE IT WORK LIKE CARMOD!!!
  465.         -- NEED TO SWITCH BUTTONS:
  466.         if the visible of sprite 14 then
  467.           -- Not Mode 3
  468.           if the visible of sprite 16 then
  469.             -- Mode 2:
  470.             -- Go to Mode 3:
  471.             puppetSound 0
  472.             updateStage
  473.             repeat with s = 14 to 16
  474.               set the visible of sprite s to false
  475.             end repeat
  476.             -- updateStage
  477.             go the frame -1
  478.             doDelay
  479.           else
  480.             -- Mode 1:
  481.             -- Go to Mode 2:
  482.             set the visible of sprite 16 to true
  483.             repeat with s = 40 to 45
  484.               set the visible of sprite s to false
  485.             end repeat
  486.             put the name of cast (the castNum of sprite 1) into here
  487.             delete char 1 of here
  488.             put integer(here) into test
  489.             --if test > 59 then 
  490.             --put test - 1 into test
  491.             --put string(test) into here
  492.             --end if
  493.             put "RTU" & getPadded(here) & "TXA.AIF" into narrate
  494.             go the frame -1
  495.             doDelay
  496.             
  497.             
  498.             set the volume of sound 2 to 64
  499.             puppetSound 0
  500.             sound playfile 1, where & narrate
  501.             updateStage
  502.           end if
  503.         else
  504.           -- Mode 3:
  505.           -- Go to Mode 1:
  506.           puppetSound 0
  507.           updateStage
  508.           set the visible of sprite 14 to true
  509.           set the visible of sprite 15 to true
  510.           repeat with s = 40 to 45
  511.             set the visible of sprite s to true
  512.           end repeat
  513.           -- updateStage
  514.           go the frame -1
  515.           doDelay
  516.         end if
  517.       end if
  518.     end if
  519.   end if
  520.   -- Should this go here?
  521.   
  522. end 
  523.  
  524. on primeNarrate
  525.   --alert "this is it!"
  526.   put the name of cast (the castNum of sprite 1) into here
  527.   delete char 1 of here
  528.   put integer(here) into test
  529.   if test > 59 then 
  530.     put test - 1 into test
  531.     put string(test) into here
  532.   end if
  533.   put "RTU" & getPadded(here) & "TXA.AIF" into narrate
  534. end